<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>

<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<col style="width:18%"/>
	<col style="width:16%"/>
	<col style="width:16%"/>
	<col style="width:18%"/>
	<col style="width:16%"/>
	<col style="width:16%"/>
	<tr class="li_1">
		<td   colspan="6" class="t_bar2">${param.title}</td>
		
	</tr>
	<tr class="li_2">
		<td   align="right" ><span class="color_red">*</span>项目名称：</td>
		<td  colspan="5">
			<input id="zh_title" onchange="setValue2(this);" name="proposal/zh_title" label="${param.title}-->项目名称" type="text" required class="input_css required maxlength:100"  style="width:595px" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr class="li_1">
	    <td   align="right" ><span class="color_red">*</span>产品规格：</td>
		<td  colspan="2">
			<input  name="proposal/product_size" label="${param.title}-->产品规格" type="text" required class="input_css required maxlength:100"  maxlength="100" value="<x:out select="$xmlData/data/proposal/product_size" />"/> 
		</td>
		<td   align="right" ><span class="color_red">*</span>产品型号：</td>
		<td  colspan="2">
			<input  name="proposal/product_model" label="${param.title}-->产品型号" type="text" required class="input_css required maxlength:100"  maxlength="100" value="<x:out select="$xmlData/data/proposal/product_model" />"/> 
		</td>
	<%-- 	<td align="right"><span class="color_red">*</span>项目类型：</td>
		<td colspan="2">
			<c:set var="proposal_type"><x:out select="$xmlData/data/proposal/proposal_type_value" /></c:set>
			<cpt:select id="proposal_type"   key="proposal_type"  value="${proposal_type}" onChange="initControlValue(this.id);"></cpt:select>
			<input type="hidden" id="proposal_type_value" name="proposal/proposal_type_value" class="required" value="${proposal_type}" label="${param.title}-->项目类型">
			<input type="hidden" name="proposal/proposal_type_name" value="<x:out select="$xmlData/data/proposal/proposal_type_name" />">
		</td> --%>
	</tr>
<%-- 	<tr class="li_2">
		<td   align="right" ><span class="color_red">*</span>产业类别：</td>
		<td  colspan="2">
			<c:set var="industr_type"><x:out select="$xmlData/data/proposal/industr_type_value" /></c:set>
			<cpt:select id="industr_type" style="width:140px"  key="industry_type"  value="${industr_type}" onChange="initControlValue(this.id);setValue(this);"></cpt:select>
			<input type="hidden" id="industr_type_value" name="proposal/industr_type_value" class="required" value="${industr_type}" label="${param.title}-->产业类别">
			<input type="hidden" id="industr_type_name" name="proposal/industr_type_name" value="<x:out select="$xmlData/data/proposal/industr_type_name" />">
		</td>
		<td align="right"><span class="color_red">*</span>行业类别：</td>
		<td colspan="2">
			<c:set var="industry_category"><x:out select="$xmlData/data/proposal/industry_category_value" /></c:set>
			<cpt:select id="industry_category" style="width:140px"  key="industry_category"  value="${industry_category}" onChange="initControlValue(this.id);setValue(this);"></cpt:select>
			<input type="hidden" id="industry_category_value" name="proposal/industry_category_value" class="required" value="${industry_category}" label="${param.title}-->行业类别">
			<input type="hidden" id="industry_category_name" name="proposal/industry_category_name" value="<x:out select="$xmlData/data/proposal/industry_category_name" />">
		</td>
		<td   align="right" ><span class="color_red">*</span>所属学科：</td>
		<td  colspan="2">
          	<c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_code" />','name':'<x:out select="$xmlData/data/proposal/subject_name" />'}</c:set>
          	<cpt:tree key="medically" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${subject}"  label="${param.title}-->所属学科"
          		id="subject" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2" />
	        <input id="subject_code" type="hidden" name="proposal/subject_code" class="required" label="${param.title}-->所属学科" value="<x:out select="$xmlData/data/proposal/subject_code" />"/>
            <input id="subject_name" type="hidden" name="proposal/subject_name"  value="<x:out select="$xmlData/data/proposal/subject_name" />"/>
		</td>
	</tr> --%>
	<%-- <tr class="li_2">
	<td  align="right" nowrap><span class="color_red">*</span>技术领域：</td>
	<td colspan="2">
			 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="domain">{'id':'<x:out select="$xmlData/data/proposal/domain_value" />','name':'<x:out select="$xmlData/data/proposal/domain_name" />'}</c:set>
          	<cpt:tree key="domain1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${domain}"  label="${param.title}-->技术领域"
          		id="domain" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue3" sqlParamVal="{grant_code:${sub},stat_year:${param.statYear}}"/>
	        <input id="domain_value" type="hidden" name="proposal/domain_value" class="required" label="${param.title}-->技术领域" value="<x:out select="$xmlData/data/proposal/domain_value" />"/>
            <input id="domain_name" type="hidden" name="proposal/domain_name"  value="<x:out select="$xmlData/data/proposal/domain_name" />"/>
	</td>
	<td  align="right" nowrap><span class="color_red">*</span>专题名称：</td>
	<td colspan="2">
			 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="dissertation">{'id':'<x:out select="$xmlData/data/proposal/dissertation_value" />','name':'<x:out select="$xmlData/data/proposal/dissertation_name" />'}</c:set>
          	<cpt:tree key="dissertation1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${dissertation}"  label="${param.title}-->专题名称"
          		id="dissertation" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue3" sqlParamVal="{grant_code:${sub},stat_year:${param.statYear}}"/>
	        <input id="dissertation_value" type="hidden" name="proposal/dissertation_value" class="required" label="${param.title}-->专题名称" value="<x:out select="$xmlData/data/proposal/dissertation_value" />"/>
            <input id="dissertation_name" type="hidden" name="proposal/dissertation_name"  value="<x:out select="$xmlData/data/proposal/dissertation_name" />"/>
	</td>
	</tr> --%>
	
	
	
	
	
	
	
	
	
	
	
	<tr class="li_2">
	<td  align="right" nowrap>产业类别：</td>
	<td colspan="2">
	        <input id="domain_value" type="hidden" name="proposal/domain_value"  value="<x:out select="$xmlData/data/proposal/domain_value" />"/>
            <span id="domain_name"  name="proposal/domain_name"><x:out select="$xmlData/data/proposal/domain_name" /></span>
            <input id="subject_no" type="hidden" name="proposal/subject_no"  value="<x:out select="$xmlData/data/proposal/subject_no" />"/>
	</td>
	
	<td  align="right" nowrap><span class="color_red">*</span>行业类别：</td>
	<td colspan="2">
			 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="researcharea_all_value"><x:out select="$xmlData/data/proposal/researcharea_all_value" /></c:set>
			<c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_name" />'}</c:set>
			<c:if test="${empty researcharea_all_value }"><c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_name" />'}</c:set></c:if>
          	<cpt:tree key="researcharea1"  cacheable="false"  className="hn_iuput_kuang gray" readonly="true" value="${researcharea}"  label="${param.title}-->行业类别"
          		id="researcharea" onlyChooseLeaf="true" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="localInitTreeValue" sqlParamVal="{grant_code:${sub},stat_year:2016}"/>
	        <input id="researcharea_value" type="hidden" name="proposal/researcharea_value" class="required" label="${param.title}-->行业类别" value="<x:out select="$xmlData/data/proposal/researcharea_value" />"/>
          <input id="researcharea_name" type="hidden" name="proposal/researcharea_name"  value="<x:out select="$xmlData/data/proposal/researcharea_name" />"/>
          <input id="researcharea_all_name" type="hidden" name="proposal/researcharea_all_name"  value="<x:out select="$xmlData/data/proposal/researcharea_all_name" />"/>
			    <input id="researcharea_all_value"  type="hidden" name="proposal/researcharea_all_value"  value="<x:out select="$xmlData/data/proposal/researcharea_all_value" />"/>
	</td>
	</tr>
	
	
	
	<tr class="li_1">
	<td  align="right" nowrap><span class="color_red">*</span>项目开始日期：</td>
		<td colspan="2">
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" onselected="setValue3" name="proposal/start_date" value="${start_date}" className="required date  dateCompare:end_date" label="${param.title}-->项目开始日期" ></cpt:date> 
		</td>
		<td  align="right" nowrap ><span class="color_red">*</span>项目结束日期：</td>
		<td colspan="2">
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date"  onselected="setValue4" name="proposal/end_date" className="required date" label="${param.title}-->项目结束日期"  value="${end_date}" ></cpt:date> 
		</td>
	</tr>
	<tr class="li_2">
	    <td  align="right" ><span class="color_red">*</span>申报日期：</td>
		<td colspan="2">
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="${param.title}-->申报日期"></cpt:date> 
		</td>
		<td align="right">归口管理部门：</td>
		<td   colspan="2" >
		<x:out select="$xmlData/data/proposal/tjbm_org_name"/>
		</td>
	</tr>
		<tr class="li_1">
	<td align="right"><span class="color_red">*</span>开发形式：</td>
	<td   colspan="2" valign="middle">
	<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="innovate2" label="独立开发" value="01" /><span style="vertical-align: middle;">独立开发</span></label>&nbsp; &nbsp;  
	<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="innovate2" label="合作开发" value="02" /><span style="vertical-align: middle;">合作开发</span></label>&nbsp; &nbsp;  
	<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="innovate2" label="引进消化吸收 " value="03" /><span style="vertical-align: middle;">引进消化吸收 </span></label>&nbsp; &nbsp;  
	<label> <input type="radio" class="do " id="advant_04" style="vertical-align: middle;" name="innovate2" label="其他" value="04" /><span style="vertical-align: middle;">其他</span></label> 
	<input type="hidden" name="proposal/innovate2_value" id="innovate2_value" class="required" value="<x:out select="$xmlData/data/proposal/innovate2_value" />" label="${param.title}-->开发形式" /> 
	<input type="hidden" name="proposal/innovate2_name" id="innovate2_name" value="<x:out select="$xmlData/data/proposal/innovate2_name" />" label="${param.title}-->开发形式" />
	</td>
	<td align="right">所属地：</td>
	<td   colspan="2" >
	<span name="organizations/organization/area_name">
				<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/area_name" />
		    </span>
	</td>
	</tr>
		<%-- <tr class="li_2">
	<td align="right">归口管理部门：</td>
	<td   colspan="5" >
	<x:out select="$xmlData/data/proposal/tjbm_org_name"/>
	</td> --%>
<%-- 	<td align="right">主管单位：</td>
	<td   colspan="2" >
	<x:out select="$xmlData/data/proposal/recomend_org_name" />
	</td> --%>
	<!-- </tr> -->
	</table>
	<br/>
<script type="text/javascript">
  function setValue2(obj){
		  $("#intro_"+$(obj).attr("id")).text($(obj).val());
  }
  function setValue(obj){
	  $("#intro_"+$(obj).attr("id")+"_name").text($("#"+$(obj).attr("id")+"_name").val());
  }
  function setValue3(){
	  $("#intro_start_date").text($("#start_date").val());
  }
  function setValue4(){
	  $("#intro_end_date").text($("#end_date").val());
  }
  
  
  
  
  
  
  
  
  function localInitTreeValue(treeId, treeNode) {
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			return false;
		}
		var showName = "";
		var parentId="";
		if (obj != null) {
		    str = obj.name + "-" + str;
			//obj = obj.parentNode;
			showName = obj.name;
			parentId=obj.id;
			$("#" + treeId).parents("tr").find("[name$='domain_value']").val(treeNode.id);
			$("#intro_domain_name").text(treeNode.name.split("_")[0]);
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val(str.split("_")[1]);
			$("#" + treeId).parents("tr").find("[name$='domain_name']").text(treeNode.name.split("_")[0]);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(parentId);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(showName);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_name'],[id$='" + treeId + "_all_name']").val(str);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_value'],[id$='" + treeId + "_all_value']").val(treeNode.id);
			
			
		/* 	alert($("#researcharea_name").val());
			$("#" + treeId).parents("td").find("[id='researcharea']").val($("#researcharea_name").val()); */
			
		}else{
			$("#"+treeId).parents("tr").find("[name$='domain_value']").val("");
			$("#"+treeId).parents("tr").find("[name$='subject_no']").val("");
		  $("#"+treeId).parents("tr").find("[name$='domain_name']").text("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_name'],[id$='" + treeId + "_all_name']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_value'],[id$='" + treeId + "_all_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		}
		/* $("#" + treeId).val(str); */
		$("#" + treeId).val($("#researcharea_name").val());
}
</script>
